package com.etc.service;

import com.etc.entity.po.FlashOneLevelStatistics;
import com.etc.rabbitmq.FlashMessage;
import com.etc.utils.PageData;
import com.etc.vo.OrderInfoMessage;
import com.etc.vo.UpdateFlashOrder;

import java.util.List;

/**
 * 文件名:com.etc.service.FlashOrderService
 * 描述：秒杀订单业务层接口
 * 作者:吴仕泉
 * 时间:2019/5/27 17:32
 */
public interface FlashOrderService {
    //下订单减库存
    public boolean PlaceAndOrder( FlashMessage fm);

    //查询秒杀订单详情
    public OrderInfoMessage findOrderInfo(String orderNum);

    //查询用户的所有秒杀订单
    public List<OrderInfoMessage> findUserAllFlashInfo(Integer uid);

    //查询所有订单以分页的形式进行展示
    public PageData<OrderInfoMessage> findAllFlashOrderByPage(Integer page,Integer pageSize);

    //修改订单的状态
    public boolean updateOrderState(Integer foid,Integer state);

    //统计每周秒杀商品的各大类销售情况
    public List<FlashOneLevelStatistics> statisticsOneLevelData();

    //修改订单信息
    public boolean updateOrderMessage(UpdateFlashOrder ufo);

    //秒杀订单总数量
    int selectFlashOrder();
    //这周的秒杀数量
    int selectDay();
}
